
import static java.lang.System.out;
import java.util.*;
public class TimeZoneDemo2 {
    public static void main(String[] args){
        TimeZone shanghaiTz=TimeZone.getTimeZone("Asia/Shanghai");
        Calendar calendar=Calendar.getInstance(shanghaiTz);
        showTime(calendar);

        TimeZone copenhagenTz=TimeZone.getTimeZone("Europe/Copenhagen");
        calendar.setTimeZone(copenhagenTz);
        showTime(calendar);

        TimeZone washingtonTz=TimeZone.getTimeZone("American/Washington");
        calendar.setTimeZone(washingtonTz);
        showTime(calendar);
    }
    static void showTime(Calendar calendar){
        out.print(calendar.getTimeZone().getDisplayName());;
        out.printf("%d：%d%n",
                calendar.get(Calendar.HOUR),
                calendar.get(Calendar.MINUTE));
    }
}
